{% extends 'base1.html' %}
{% load staticfiles %}
{% block title %}考试成绩{% endblock %}



{% block content %}

   <style>
        #mydef {
            text-align: center;
        }

        .finish {
            font-size: 30px;
            margin: auto;
        }

        .score {
            font-size: 50px;
            color: red;
        }

      .begin {
            width: 200px;
            margin: 0 auto;
            font: 20px/32px "Micorosoft Yahei";
        }

        #box1 {
            width: 600px;
            margin: 20px auto;
        }

        #box1 p {
            font-size: 18px;
            margin-bottom: 4px;
        }

       #box2 {
            width: 250px;
            margin: 20px auto;
        }


        #box2 p {
            font-size: 20px;
            margin-bottom: 4px;
        }

        .tj {
            font-size: 16px;
            margin: auto;
        }

    </style>



<div id="mydef">
    <h1 class="finish">考试结束！！！</h1>
    <h1 class="score">你的成绩为: {{ score }}</h1>

</div>
    {% if wrong_question_count == 0 %}
        <div id="mydef">
        <h1 class="score">恭喜你全对</h1>
</div>

    {% else %}
         <h1 class="score">你的错题是：</h1>
                  {% for wrong_question_now in wrong_question %}

                    <div id="box1">
                        {% if wrong_question_now.questionType == 'xz' %}
                        <from id="{{ wrong_question_now.id }}">

                            <p>{{ forloop.counter }}.({{ "选择" }}) {{ wrong_question_now.content }}正确答案({{ wrong_question_now.answer }})</p>
                            <input type="hidden" value="{{ wrong_question_now.id }}">
                            <label><input name="{{ wrong_question_now.id }}" type="radio"
                                          value="A"/>{{ wrong_question_now.choice_a }}
                            </label><br/>
                            <label><input name="{{ wrong_question_now.id }}" type="radio"
                                          value="B"/>{{ wrong_question_now.choice_b }}
                            </label><br/>
                            <label><input name="{{ wrong_question_now.id }}" type="radio"
                                          value="C"/>{{wrong_question_now.choice_c }}
                            </label><br/>
                            <label><input name="{{ wrong_question_now.id }}" type="radio"
                                          value="D"/>{{ wrong_question_now.choice_d }}
                            </label><br/>
                        </from>
                        {% endif %}
                        {% if wrong_question_now.questionType == 'mxz' %}
                        <from id="{{ wrong_question_now.id }}" >

                            <p>{{ forloop.counter }}.({{ "多选" }}) {{ wrong_question_now.content }}正确答案({{ wrong_question_now.answer }})</p>
                            <input type="hidden" value="{{ wrong_question_now.id }}">
                            <label><input name="{{ wrong_question_now.id }}_1" type="checkbox"
                                          value="A" />{{ wrong_question_now.choice_a }}
                            </label><br/>
                            <label><input name="{{ wrong_question_now.id }}_2" type="checkbox"
                                          value="B"/>{{ wrong_question_now.choice_b }}
                            </label><br/>
                            <label><input name="{{ wrong_question_now.id }}_3" type="checkbox"
                                          value="C" />{{ wrong_question_now.choice_c }}
                            </label><br/>
                            <label><input name="{{ wrong_question_now.id }}_4" type="checkbox"
                                          value="D" />{{ wrong_question_now.choice_d }}
                            </label><br/>
                            <label><input name="{{ wrong_question_now.id }}_5" type="checkbox"
                                          value="E" />{{ wrong_question_now.choice_e }}
                            </label><br/>
                            <label><input name="{{ wrong_question_now.id }}_6" type="checkbox"
                                          value="F"/>{{ wrong_question_now.choice_f }}
                            </label><br/>
                        </from>
                        {% endif %}
                        {% if wrong_question_now.questionType == 'pd' %}
                        <from id="{{ wrong_question_now.id }}">

                            <p>{{ forloop.counter }}.({{ "判断"  }}) {{ wrong_question_now.content }}正确答案({{ wrong_question_now.answer }})</p>
                            <input type="hidden" value="{{ wrong_question_now.id }}">
                            <label><input name="{{ wrong_question_now.id }}" type="radio"
                                          value="True"/>{{ wrong_question_now.boolt }}
                            </label><br/>
                            <label><input name="{{ wrong_question_now.id }}" type="radio"
                                          value="False"/>{{ wrong_question_now.boolf }}
                            </label><br/>
                        </from>
                        {% endif %}
                            </div>

                    <hr/>
                {% endfor %}
            {% endif %}


    <div id="box2">
      <a   href="{% url 'index' %}">
    <input class="btn btn-green"   value="回到首页  " />
      </a>
</div>
  <section class="content-header">


    </section>

{% endblock %}

